<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <title>Desktop <?= $title ?></title>
        <link href="<?= base_url() ?>css/style.css" rel="stylesheet" type="text/css" media="screen" />
        <link type="text/css" href="<?= base_url() ?>css/blitzer/jquery-ui-1.8.13.custom.css" rel="stylesheet" />
        <link href="<?= base_url() ?>css/validation/validationEngine.jquery.css" rel="stylesheet" type="text/css" media="screen" />
        <link href="<?= base_url() ?>css/tooltip.css" rel="stylesheet" type="text/css" media="screen" />


        <script type="text/javascript" src="<?= base_url() ?>js/jquery-1.6.min.js"></script>
        <script type="text/javascript" src="<?= base_url() ?>js/jquery-ui-1.8.13.custom.min.js"></script>
        <!--        load validation-->
        <script src="<?= base_url() ?>js/validation/jquery.validationEngine-en.js" type="text/javascript"></script>
        <script src="<?= base_url() ?>js/validation/jquery.validationEngine.js" type="text/javascript"></script>
        <script src="<?= base_url() ?>js/tooltip.js" type="text/javascript"></script>
        <script src="<?= base_url() ?>js/helper_functions.js" type="text/javascript"></script>
        <!--load tiny_mce-->
        <script type="text/javascript" src="<?= base_url() ?>js/jscripts/tiny_mce/tiny_mce.js"></script>

        <script type="text/javascript">
            tinyMCE.init({
                mode : "textareas",
                //        plugins: 'advimagescale',
                theme : "simple",
                content_css : "<?= base_url() ?>css/post.css",
                plugins: 'advimagescale',
                cleanup_on_startup: true,
                advimagescale_maintain_aspect_ratio: true, /* this is the default behavior */
                advimagescale_fix_border_glitch: true, /* also the default behavior */
                advimagescale_noresize_all: false, /* set to true to prevent all resizing on images */
                advimagescale_append_to_url: true, /* apply dimensions to image URL on resize */
                advimagescale_url_width_key: 'w',  /* apply width to URL as w= param */
                advimagescale_url_height_key: 'h', /* apply height to URL as h= param */
                advimagescale_max_height: 10000, /* limit maximum image height to 10000px in other words no limit */
                advimagescale_max_width:  510, /* limit maximum image width to 510px */
                advimagescale_min_height: 20, /* minimum image height is 20px */
                advimagescale_min_width:  20, /* minimum image width is 20px */
                /* call this function when an image is loading */
                advimagescale_loading_callback: function(imgNode) {
                    //            alert(imgNode.src + ' is loading');
                },
                /* call this function when an image is finished loading */
                advimagescale_loaded_callback: function(imgNode) {
                    //            alert(imgNode.src + ' is loaded');
                },
                /* call this function when an image has been resized */
                advimagescale_resize_callback: function(editorInstance, imgNode) {
                    //            alert('resized to ' + imgNode.width + 'x' + imgNode.height);
                }
            });
        </script>
        <!--end of ;load tinymce-->
    </head>
    <body>
        <div id="wrapper">
            <!--            <div id="logo">
                        </div>-->
            <hr />
            <!-- end #logo -->
            <div id="header">
                <div id="menu">
                    <ul>
                        <li><?= anchor("welcome/index/no", "Home", "class='first'") ?></li>
                        <?php if ($this->session->userdata("admin")) {
                        ?>
                        <?php foreach ($cats as $row) {
                        ?>
                                <li> <?= anchor("admin_mis/index/" . $row['tid'], $row['name']) ?></li><!--i>i</i>-Board-->
                        <?php } ?>

                        <?php if ($this->session->userdata("admin") === 'admin') {
                        ?>
                                <li>  <?= anchor("admin_settings", "System Administration") ?></li>
                        <?php
                            }
                        } else {
                        ?>
                        <?php
                            if ($this->session->userdata("username")) {
                        ?>
                                <li><?= anchor("admin_mis", "Desktop") ?></li>
                        <?php
                            } else {
                        ?>
        <!--                                <li><?= anchor("applicants/newApplicant", "Register") ?></a></li>-->
        <!--                                <li><?= anchor("applicants/openLogin", "Login") ?></li>-->
                                <li><?= anchor("admin", "Login") ?></li>
                        <?php
                            }
                        }

//                        if ($this->session->userdata("username")) {
//                        ?>
                        <!--                            <li>//</li>-->
                        <?php
//                        }
//                        ?>

                        <li><?= anchor("welcome/contact", "Contact") ?></li>
                    </ul>
                    <div id="search">
                        <?php if ($this->session->userdata("username")) {
                        ?>
                        <?= anchor("applicants/logout", "Logout", "class=logged") ?> <?= $this->session->userdata("username"); ?>
                        <?php
                        }
                        ?>
                    </div>
                </div>
            </div>
            <!-- end #header -->
            <!-- end #header-wrapper -->
            <div id="page" style="width: 1220px;" >
                <div id="page-bgtop">
                    <div id="content"style="width: 958px;">